package api

import (
	"github.com/gin-gonic/gin"
	"video_07_21/api/handler"
)

func LoadRouter(r *gin.Engine) {

	api := r.Group("/api")
	{
		user := api.Group("/user")
		{
			user.POST("register", handler.RegisterUser)
			user.POST("login", handler.LoginUser)

		}
		like_video := api.Group("/like_video")
		{
			like_video.POST("add", handler.AddLikeVideo)
			like_video.POST("statusUpdate", handler.StatusUpdateLikeVideo)
			like_video.POST("list", handler.ListLikeVideo)
		}
		video := api.Group("/video")
		{
			video.POST("like", handler.LikeVideo)
			video.GET("list", handler.ListVideo)
		}
	}

}
